#include<bits/stdc++.h>
using namespace std;
#define int long long
int n,a[100009],c[100009],ans,can_eat[100009];
vector<int> v;
signed main(){
freopen("duel.in","r",stdin);
freopen("duel.out","w",stdout);
    cin>>n;ans=n;
    for(int i=1;i<=n;i++)cin>>a[i],c[a[i]]++;
    for(int i=1;i<=100000;i++){
        if(c[i])v.push_back(i),can_eat[i]=c[i];
    }
    while(v.size()>1){
        int x=c[v.back()];
        v.pop_back();
        int now=v.size()-1;
        while(now>=0&&x){
            if(can_eat[v[now]]<=x){
                x-=can_eat[v[now]];
                ans-=can_eat[v[now]];
                can_eat[v[now]]=0;
            }
            else ans-=x,can_eat[v[now]]-=x,x=0;
            now--;
        }
    }
    cout<<ans<<"\n";
}
